package cn.signalpha.modules.shop.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 类说明
 *
 * @author suguangjun
 */
@Getter
@AllArgsConstructor
public enum SellerAccountTypeEnum {

	/**
	 * 主账号
	 */
    MAIN(1, "主账号"),

	/**
	 * 子账号
	 */
    MINOR(2, "子账号"),
	;

	final int type;
	final String name;

    public static SellerAccountTypeEnum instance(int type){
        for(SellerAccountTypeEnum sellerAccountTypeEnum : values()){
            if (sellerAccountTypeEnum.getType() == type) {
                return sellerAccountTypeEnum;
            }
        }
        return null;
    }

}
